let SYSTEM_INFO = uni.getSystemInfoSync();
export const getStatusBarHeight = ()=>SYSTEM_INFO.statusBarHeight||0;
export const getTitleBarHeight = ()=>{
	// #ifdef MP-WEIXIN
		let {top,height} = uni.getMenuButtonBoundingClientRect(); //获取胶囊
		return  (height+(top-getStatusBarHeight())*2);
	// #endif
	// #ifdef H5
		return 40;
	// #endif
}

export const getNavbarHeight = ()=>{
	return getStatusBarHeight()+getTitleBarHeight();
}

export const getLeftIconLeft = ()=> {
	// #ifdef MP-TOUTIAO
		let {leftIcon:{left,width}}  = tt.getCustomButtonBoundingClientRect();
		return left+ parseInt(width);
	// #endif
	
	// #ifndef MP-TOUTIAO
		return 0
	// #endif	
}


